import {
    createStore
} from 'redux'

function fn(state = 2, action) {
    switch (action.type) {
        case "jia":
            return state += action.n;
        case "jian":
            return state-=action.n;
        default:
            return state
    }
}

let store = createStore(fn)
export default store